MODULE    commons
    USE      params
    IMPLICIT NONE

    INTEGER (KIND=4),  PARAMETER            :: NIU = 1, &
                                               NOU = 2, &
                                               NPU = 6
    REAL (KIND=4),     PARAMETER            :: PI = 3.141592654d0, &
                                               DEG = 57.29578

    ! array with dimension (1:NSOL+2)
    COMPLEX (KIND=4), ALLOCATABLE, DIMENSION(:)       :: BOTX
    COMPLEX (KIND=4), ALLOCATABLE, DIMENSION(:)       :: BOTY
    COMPLEX (KIND=4), ALLOCATABLE, DIMENSION(:)       :: SURX
    COMPLEX (KIND=4), ALLOCATABLE, DIMENSION(:)       :: SURY
    ! array with dimension (1:N)
    COMPLEX (KIND=4), ALLOCATABLE, DIMENSION(:)       :: DP, DS, PORTX, PORTY, STBDX, STBDY
    COMPLEX (KIND=4)                        :: UA, UB, UC

    ! array with dimension (1:N, 1:NSOL)
    COMPLEX (KIND=4), ALLOCATABLE, DIMENSION(:, :)    :: U, D
    COMPLEX (KIND=4), ALLOCATABLE, DIMENSION(:, :)    :: AL, BL
    COMPLEX (KIND=4), ALLOCATABLE, DIMENSION(:, :)    :: AU, BU
    COMPLEX (KIND=4), ALLOCATABLE, DIMENSION(:, :)    :: AM, BM
    COMPLEX (KIND=4), ALLOCATABLE, DIMENSION(:, :)    :: XN1, XN2
    REAL    (KIND=4), ALLOCATABLE, DIMENSION(:, :)    :: RHO1, RHO2

    REAL (KIND=4), DIMENSION(MXSVP,MXSOL)   :: CSVP, ZSVP
    REAL (KIND=4), DIMENSION(MXLYR,MXSOL)   :: BETA, BETAG, RHO, RHOG, ZLYR
    REAL (KIND=4), DIMENSION(MXSOL)         :: DRMIN, R1, R2, THETA, Z1, Z2
    REAL (KIND=4), DIMENSION(MXTRK,2,MXSOL) :: TRACK

    REAL (KIND=4) ::    ALPHA,      &
                        ANG,        &
                        ALFA,       &
                        C0,         &
                        DOUGRA,     &
                        DR,         &
                        DZ,         &
                        DTH,        &
                        FLDW,       &
                        FRQ,        &
                        PDR,        &
                        PDTH,       &
                        PDZ,        &
                        PHI,        &
                        R0,         &
                        RA,         &
                        RMAX,       &
                        RSVP,       &
                        U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, &
                        WDTH,       &
                        WDR,        &
                        WDZ,        &
                        WZ1,        &
                        WZ2,        &
                        XK0,        &
                        ZA,         &
                        ZI,         &
                        ZS
    INTEGER (KIND=4) :: IBOT,                             &
                        ISFLD,                            &
                        ISVP,                             &
                        IHNK,                             &
                        ISF,                              &
                        ITRK(MXSOL),                      &
                        ITYPEB,                           &
                        ITYPES,                           &
                        ITYPPW,                           &
                        ITYPSW,                           &
                        IXSVP(MXLYR,MXSOL),               &
                        KSVP,                             &
                        N,                                &
                        N1,                               &
                        NDIM,                             &
                        NDIV,                             &
                        NLYR,                             &
                        NLYRS(MXSOL),                     &
                        NSEC,                             &
                        NSOL,                             &
                        NSVP,                             &
                        NTOT,                             &
                        NWSVP
END MODULE commons
